package com.talkology.pilot.manager.util;

import com.talkology.pilot.database.model.TalkSalonMgt;
import com.talkology.pilot.manager.model.TalkSalonMgtRest;

public class ModelParse {

    public static TalkSalonMgtRest parseSalonToRest(TalkSalonMgt talkSalonMgt) {
        TalkSalonMgtRest salonMgtRest = new TalkSalonMgtRest();
        salonMgtRest.setTalkSalonName(talkSalonMgt.getTalkSalonName());
        salonMgtRest.setSubject(talkSalonMgt.getSubject());
        salonMgtRest.setTeacher(talkSalonMgt.getTeacher());
        salonMgtRest.setStudentLimit(talkSalonMgt.getStudentLimit());
        salonMgtRest.setUseCredit(talkSalonMgt.getUseCredit());
        salonMgtRest.setUseMoney(talkSalonMgt.getUseMoney());
        salonMgtRest.setCreatedAt(talkSalonMgt.getCreatedAt());
        salonMgtRest.setUpdatedAt(talkSalonMgt.getUpdatedAt());
        return salonMgtRest;
    }

    public static TalkSalonMgt parseSalonToTable(TalkSalonMgtRest talkSalonMgtRest) {
        TalkSalonMgt talkSalonMgt = new TalkSalonMgt();
        talkSalonMgt.setTalkSalonName(talkSalonMgtRest.getTalkSalonName());
        talkSalonMgt.setSubject(talkSalonMgtRest.getSubject());
        talkSalonMgt.setTeacher(talkSalonMgtRest.getTeacher());
        talkSalonMgt.setStudentLimit(talkSalonMgtRest.getStudentLimit());
        talkSalonMgt.setUseCredit(talkSalonMgtRest.getUseCredit());
        talkSalonMgt.setUseMoney(talkSalonMgtRest.getUseMoney());
        talkSalonMgt.setCreatedAt(talkSalonMgtRest.getCreatedAt());
        talkSalonMgt.setUpdatedAt(talkSalonMgtRest.getUpdatedAt());
        return talkSalonMgt;
    }
}
